<!--  //  app/templates/myaction.hbs  -->

<script type="text/x-handlebars" id="components/my-action">
<!-- showDetailInfo这个事件的名字必须要跟controller里的方法名字一致 -->
<h2 {{action 'showDetailInfo'}} style="cursor: pointer;">{{model.title}}</h2>
{{#if isShowingBody}}
<p>
{{model.body}}
</p>
{{/if}}

<br><br>
<p>
<!-- model直接作为参数传递到controller -->
<button {{action 'hitMe' model}}>点击我吧</button>
<br>
<a href="#/myaction" {{action 'triggerMe' on="mouseOver"}}>键盘按下时触发我</a>
</p>

<br><br>
<button {{action 'pressALTKeyTiggerMe' allowedKeys="alt"}}>按下Alt触发我</button>




{{yield}}

</script>